<template>
	<view>
		<c-img :src="detail.thumbnail" :width="750" :height="750" />
		<!-- <image mode="widthFix" style="width: 750rpx" src="./test/main.jpg"></image> -->
	</view>
	<view class="p-3-1">
		<view class="mb-2-2">
			<text class="color-error font-semibold">
				<text class="text-n">¥</text>
				<text class="text-xl">{{ detail.price || '--' }}</text>
			</text>
		</view>
		<view class="mb-4-2">
			<text class="color-main text-m font-semibold">{{ detail.name || '--' }}</text>
		</view>
		<b-des-item label="单位" :value="detail.measurementUnit || '--'"></b-des-item>
		<b-des-item label="规格" :value="detail.specifications || '--'"></b-des-item>
		<b-des-item label="产地" :value="detail.productArea || '--'"></b-des-item>
		<b-des-item label="保存方式" :value="detail.saveAs || '--'"></b-des-item>
		<b-des-item label="克重" :value="detail.weight || '--'" mg-class=""></b-des-item>
	</view>
	<view v-if="detail.introduction">
		<rich-text class="detail-content" :nodes="handleImgRichText(detail.introduction)"></rich-text>
		<!-- <image mode="widthFix" style="width: 750rpx" src="./test/1.jpg"></image>
		<image mode="widthFix" style="width: 750rpx" src="./test/2.jpg"></image>
		<image mode="widthFix" style="width: 750rpx" src="./test/3.jpg"></image> -->
	</view>
</template>

<script setup>
import { handleImgRichText } from "@/base/common-business.js";
const props = defineProps({
	detail: Object,
});
</script>

<style>
.detail-content img {
	width: 100%!important;
	height: auto!important;
}
</style>